/*
 * @Author: wcx 1055127249@qq.com
 * @Date: 2025-01-07 17:31:03
 * @LastEditors: wcx 1055127249@qq.com
 * @LastEditTime: 2025-01-10 14:32:59
 * @FilePath: \my-project\src\views\CreateProcess\register\activity.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Graph } from '@antv/x6'
import { createPods } from './ports'
Graph.registerNode(
  'activity',
  {
    inherit: 'rect',
    width: 100,
    height: 60,
    markup: [
      {
        tagName: 'rect',
        selector: 'body',
      },
      {
        tagName: 'image',
        selector: 'img',
      },
      {
        tagName: 'text',
        selector: 'label',
      }
    ],
    attrs: {
      body: {
        rx: 6,
        ry: 6,
        stroke: '#5F95FF',
        fill: 'transparent',
        strokeWidth: 2,
      },
      img: {
        x: 6,
        y: 6,
        width: 16,
        height: 16,
        'xlink:href': '/icon-user.png',
      },
      label: {
        fontSize: 12
      }
    },
    ports: createPods('top', 'left', 'bottom', 'right')
  },
  true,
)